package com.wanxi.test;

public class Student extends Parent {

//    private Integer id;

    public void aa(int id){

        System.out.println(id);
        System.out.println(this.id);
        System.out.println(super.id);
    }
    public void study() {

        System.out.println("好好学习");
    }

    public Student() {
//        super();
        System.out.println("子类的无参数构造方法");
//        this(1);
    }

    public Student(Integer id) {
//        super();
        System.out.println("子类的有参数构造方法");
        this.id = id;
    }
    @Override
    public String eat(String name) {
        System.out.println("吃饭加肉肉");
        return "";
    }
    public Student(String name, Integer age, Integer id) {
//        super(name, age);
        System.out.println("子类的全参数构造方法");
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
}
